import { I18nOptions, QueryResolver, AcceptLanguageResolver } from 'nestjs-i18n';
import { join } from 'path';

export const i18nConfig: I18nOptions = {
    fallbackLanguage: 'en',
    loaderOptions: {
        path: join(process.cwd(), 'src/i18n/locales/'),
        watch: true,
    },
    resolvers: [
        { use: QueryResolver, options: ['lang'] },
        AcceptLanguageResolver,
    ],
    logging: true, // 添加日志来调试
};
